
#ifndef TRANSFORMNOTE_H
#define TRANSFORMNOTE_H

#include <BVector>
#include <BRealSpinBox>
#include <BCheckBox>

#include "../Target.h"
#include "Note.h"

class TransformNote : public Note
{
	BOBJECT(TransformNote)
public:
	TransformNote(BWidget* parent = 0);
	~TransformNote();

	virtual BSize sizeHint() const;

protected:
	void scaleShape(BShape* shape);
	void scaleNode(BNode* node);
	void scaleGroup(BGroup* group);

protected:
	void slotAssetChanged(BObject* object, const BValue& value);
	void slotPositionEditFinished(BObject* object, const BValue& value);
	void slotRotationEditFinished(BObject* object, const BValue& value);
	void slotCollapseScaleButtonClicked(BObject* object, const BValue& value);
	void slotScalingEditFinished(BObject* object, const BValue& value);
	void slotTargetChanged(BObject* object, const BValue& value);

protected:
	virtual void styleEvent(const BEvent& event);

private:
	BMatrix			_matrix;
	BHolder<Target>	_target;

	BRealSpinBox*	_positionXSpinBox;
	BRealSpinBox*	_positionYSpinBox;
	BRealSpinBox*	_positionZSpinBox;

	BRealSpinBox*	_rotationXSpinBox;
	BRealSpinBox*	_rotationYSpinBox;
	BRealSpinBox*	_rotationZSpinBox;

	BButton*		_collapseScaleButton;
	BRealSpinBox*	_scalingXSpinBox;
	BRealSpinBox*	_scalingYSpinBox;
	BRealSpinBox*	_scalingZSpinBox;

};
#endif
